class B
{
public:
	~B()
	{
		cout << "~B()" << endl;
	}
	int b = 0;
};
int main()
{
	B* ptr = new B();
	shared_ptr<B> sp(new B(), [](B* p) {
		++(p->b);
		});
	auto sp1 = sp;
	B* ptr1 = new B();
	sp.reset(ptr1, [](B* p) { //这种对不同智能指针对象reset同一个资源会导致该资源释放两次，值得注意。
		++(p->b);
		});
	sp1.reset(ptr1, [](B* p) {
		++(p->b);
		});
	delete ptr;
	delete ptr1;
    char arr[] = { 'k','i','\0'};
	char* str = arr;
	cout << (void*)arr << "   " << (void*)str;
	return 0;
}